package com.jr.service.impl;


import com.jr.entity.UserJobEnterprise;
import com.jr.mapper.UserJobEnterpriseDao;
import com.jr.service.UserJobEnterpriseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


/**
 * 用户工作企业三表关联
 *
 * @author Snoopy
 * @since 1.0.0 2022-12-31
 */
@Service
public class UserJobEnterpriseServiceImpl implements UserJobEnterpriseService {

@Autowired
    private UserJobEnterpriseDao userJobEnterpriseDao;

    @Override
    public List<UserJobEnterprise> getAllJob(Map<String, String> map) {
        return userJobEnterpriseDao.selectJobs(map);
    }

    @Override
    public List<UserJobEnterprise> getAllJobbyuid(Map<String, String> map) {
        return userJobEnterpriseDao.selectJobsbyuid(map);
    }


    @Override
    public List<UserJobEnterpriseDao> queryJobAll(String uid) {
        return null;
    }

    @Override
    public List<UserJobEnterpriseDao> queryJobAllByUid(String uid) {
        return null;
    }

    @Override
    public boolean updateApplication(UserJobEnterprise userJobEnterprise) {
        return userJobEnterpriseDao.updateUserJobEnterprise(userJobEnterprise)==1?true:false;
    }

    @Override
    public boolean addApplication(UserJobEnterprise userJobEnterprise) {
        return userJobEnterpriseDao.insertUserJobEnterprise(userJobEnterprise)==1;
    }

    @Override
    public boolean modifyEnterpriseAttention(UserJobEnterprise userJobEnterprise) {
        return userJobEnterpriseDao.updateEnterpriseAttention(userJobEnterprise)==1?true:false;
    }
    @Override
    public int getTotalRows(Map<String,String> map) {
        return userJobEnterpriseDao.queryTotalRows(map);
    }

    @Override
    public int getTotal(Map<String,String> map) {
        return userJobEnterpriseDao.queryTotal(map);
    }

    @Override
    public UserJobEnterprise getUserJobEnterprise(UserJobEnterprise userJobEnterprise) {
        return userJobEnterpriseDao.selectUserJobEnterprise(userJobEnterprise);
    }

    @Override
    public UserJobEnterprise selectJobByJid(Map<String, String> map) {
        return userJobEnterpriseDao.selectJobByJid(map);
    }
}